import axiosInstance from './axiosInstance';

/**
 * 分类相关API服务
 */
const categoryApi = {
  /**
   * 获取所有启用的视频类别
   * @returns {Promise} 返回类别列表数据
   */
  getCategories: () => {
    return axiosInstance.get('/categories');
  },

  /**
   * 获取单个视频类别的详情
   * @param {number} categoryId - 类别ID
   * @returns {Promise} 返回类别详情数据
   */
  getCategoryById: (categoryId) => {
    return axiosInstance.get(`/categories/${categoryId}`);
  }
};

export default categoryApi;